<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试STOMP通信协议</title>
    <script src="js/stomp.min.js"></script>
    <script>
        var client = Stomp.client('ws://192.168.1.8:15674/ws');

        var on_connect = function(x) {
            id = client.subscribe("/exchange/webnotify", function(d) {
                //print_first(d.body);
                alert(d.body);
            });
        };
        var on_error =  function() {
            console.log('error');
        };
        client.connect('webnotify', '123456', on_connect, on_error, '/');
    </script>
</head>
<body>
    使用Rabbitmq的WEB STOMP插件，测试服务端推送消息..
</body>

</html>